<%@ page contentType="text/html;charset=UTF-8" language="java" %>  
<%@include file="/common/jsp/common_header.jsp"%>
<html>

<head> 
	<title>栏目管理</title> 
	<script> 
	$(function() {
		$( "#tabs" ).tabs(
			//{ selected: 1 }
		);
		$("#baseInfo").click(function(){
			var src ="<s:property value="ctx"/>/cms/cmsfold!findFolderById.action?id=<s:property value="id"/>";
			$("#baseInfoFrame").attr("src",src).load(
				function(){
				resetFrameHeight("baseInfoFrame");
				}
			);
		});
		
		$("#subList").click(function(){
			var src =src="<s:property value="ctx"/>/cms/cmsfold!listChildFolders.action?columns.parentId=<s:property value="id"/>"
			$("#subListFrame").attr("src",src).load(
			function(){
				resetFrameHeight("subListFrame");
				}
			);
		});
			$("#baseInfo").click();
	});
	function selectSubListTab(){
		$("#subList").click();
	}
    function resetFrameHeight(frameId){
    	var height=document.getElementById(frameId).contentWindow.document.documentElement.scrollHeight;;
    	//alert(height)
    	$('#'+frameId).attr('height',height);
    
	}
	function resetIframeHeight(iframe){
	var iframes = document.getElementById(iframe);
    var height = iframes.contentWindow.document.body.scrollHeight; 
   
    $("#"+iframe).height(height);   
   //if(parent.window){
	   //parent.window.resetAllIframeHeight();
   //}
    
}
	</script> 
</head> 
<body>
<div id="tabs"> 
	<ul> 
		<li><a href="#tabs-1" id="baseInfo">基本信息</a></li> 
		<li><a href="#tabs-2" id="subList">子栏目列表</a></li> 
		
	</ul> 
	<div id="tabs-1"> 
		<iframe id="baseInfoFrame" width="100%" height="500" scrolling="auto" frameborder="0"></iframe>
	</div> 
	<div id="tabs-2"> 
		<iframe id="subListFrame"  width="100%" height="500" scrolling="auto" frameborder="0"></iframe>
	</div> 
</div> 
</body>
</html>